<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>教材版本编辑 - 智慧题库管理系统</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <!-- Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#2563eb',
                        secondary: '#4f90ff',
                        accent: '#10b981',
                        dark: '#1e293b',
                        light: '#f8fafc',
                        muted: '#64748b',
                        'sidebar-bg': '#f8fafc',
                        'sidebar-item': '#64748b',
                        'sidebar-item-active': '#2563eb',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                    boxShadow: {
                        'card': '0 10px 30px -5px rgba(0, 0, 0, 0.1)',
                        'card-hover': '0 15px 35px -5px rgba(37, 99, 235, 0.15)',
                        'sidebar': '0 0 20px rgba(0, 0, 0, 0.05)',
                    }
                },
            }
        };
    </script>
    
    <!-- 自定义样式 -->
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .bg-education {
                background-image: 
                    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 20%),
                    radial-gradient(circle at 80% 30%, rgba(79, 144, 255, 0.05) 0%, transparent 25%),
                    radial-gradient(circle at 40% 70%, rgba(16, 185, 129, 0.05) 0%, transparent 30%),
                    radial-gradient(circle at 90% 90%, rgba(37, 99, 235, 0.05) 0%, transparent 20%);
            }
            .tree-line {
                @apply border-l-2 border-dashed border-gray-200 ml-3 pl-4;
            }
            .sidebar-item {
                @apply flex items-center space-x-3 px-4 py-3 text-sidebar-item rounded-lg transition-all duration-200 cursor-pointer;
            }
            .sidebar-item:hover {
                @apply bg-primary/5 text-sidebar-item-active;
            }
            .sidebar-item.active {
                @apply bg-primary/10 text-sidebar-item-active font-medium;
            }
            .form-input {
                @apply w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 transition-all;
            }
            .btn-primary {
                @apply px-4 py-2 bg-primary text-white rounded-lg shadow-sm hover:bg-primary/90 transition-colors;
            }
            .btn-secondary {
                @apply px-4 py-2 bg-white border border-gray-300 text-dark rounded-lg shadow-sm hover:bg-gray-50 transition-colors;
            }
        }
    </style>
</head>
<body class="font-inter bg-gray-50 min-h-screen flex flex-col bg-education">
    <!-- 顶部导航栏 -->
    <header class="sticky top-0 z-50 bg-white/90 backdrop-blur-sm shadow-sm transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <div class="w-10 h-10 bg-primary/10 rounded-xl flex items-center justify-center text-primary">
                    <i class="fa fa-book"></i>
                </div>
                <h1 class="text-xl font-bold text-dark ml-0 md:ml-[-2rem]">智慧题库管理系统</h1>
            </div>
            
            <!-- 顶部导航 -->
            <div class="hidden md:flex items-center space-x-2">
                <div class="nav-item" data-section="dashboard">
                    <i class="fa fa-home mr-2"></i> 控制面板
                </div>
                <div class="nav-item" data-section="question">
                    <i class="fa fa-book mr-2"></i> 题库管理
                </div>
                <div class="nav-item active" data-section="textbook">
                    <i class="fa fa-archive mr-2"></i> 教材管理
                </div>
                <div class="nav-item" data-section="statistics">
                    <i class="fa fa-bar-chart mr-2"></i> 数据分析
                </div>
                <div class="nav-item" data-section="settings">
                    <i class="fa fa-cog mr-2"></i> 系统设置
                </div>
            </div>
            
            <div class="flex items-center space-x-4">
                <button class="p-2 text-muted hover:text-primary transition-colors relative">
                    <i class="fa fa-bell"></i>
                    <span class="absolute top-1 right-1 w-2 h-2 bg-accent rounded-full"></span>
                </button>
                <div class="flex items-center space-x-2">
                    <img src="https://picsum.photos/id/64/40/40" alt="用户头像" class="w-8 h-8 rounded-full object-cover border-2 border-primary/20">
                    <span class="hidden md:inline text-sm font-medium text-dark">张老师</span>
                    <i class="fa fa-angle-down text-muted"></i>
                </div>
                <button class="md:hidden p-2 text-muted hover:text-primary transition-colors" id="mobile-menu-button">
                    <i class="fa fa-bars"></i>
                </button>
            </div>
        </div>
    </header>

    <!-- 主内容区 -->
    <main class="flex-grow flex">
        <!-- 左侧导航栏 -->
        <aside id="sidebar" class="w-64 bg-sidebar-bg shadow-sidebar transition-all duration-300 h-[calc(100vh-64px)] sticky top-[64px] overflow-y-auto">
            <!-- 教材管理菜单 -->
            <div id="textbook-menu" class="sidebar-menu active">
                <div class="p-4 border-b border-gray-200">
                    <h3 class="text-sm font-medium text-muted uppercase tracking-wider">教材管理</h3>
                </div>
                <div class="p-2">
                    <div class="sidebar-item">
                        <i class="fa fa-list"></i>
                        <span>教材列表</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-plus-circle"></i>
                        <span>添加教材</span>
                    </div>
                    <div class="sidebar-item active">
                        <i class="fa fa-versions"></i>
                        <span>版本管理</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-book-chapter"></i>
                        <span>章节管理</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-tags"></i>
                        <span>知识点管理</span>
                    </div>
                    <div class="sidebar-item">
                        <i class="fa fa-upload"></i>
                        <span>教材导入</span>
                    </div>
                </div>
            </div>
        </aside>

        <!-- 内容区域 -->
        <div class="flex-grow p-6">
            <!-- 页面标题 -->
            <div class="mb-8">
                <div class="flex items-center justify-between">
                    <div>
                        <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-dark">编辑教材版本</h2>
                        <p class="text-muted mt-2">修改教材版本信息及关联章节、小节和知识点</p>
                    </div>
                    <div class="flex space-x-3">
                        <button class="btn-secondary">
                            <i class="fa fa-eye mr-2"></i>预览
                        </button>
                        <button class="btn-secondary">
                            <i class="fa fa-copy mr-2"></i>复制版本
                        </button>
                        <button class="btn-primary">
                            <i class="fa fa-save mr-2"></i>保存修改
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 编辑内容区 -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
                <!-- 左侧：版本基本信息 -->
                <div class="lg:col-span-1 space-y-6">
                    <!-- 基本信息表单 -->
                    <div class="bg-white rounded-2xl p-6 shadow-card">
                        <h3 class="text-lg font-bold text-dark mb-6 flex items-center">
                            <i class="fa fa-info-circle text-primary mr-2"></i>基本信息
                        </h3>
                        
                        <div class="space-y-4">
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">所属教材</label>
                                <select class="form-input">
                                    <option>高中数学（必修）</option>
                                    <option>高中物理（必修）</option>
                                    <option>高中化学（必修）</option>
                                </select>
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">出版社</label>
                                <select class="form-input">
                                    <option>人民教育出版社</option>
                                    <option>江苏教育出版社</option>
                                    <option>北京师范大学出版社</option>
                                    <option>上海科学技术出版社</option>
                                </select>
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">版本年份</label>
                                <input type="text" class="form-input" value="2025" placeholder="例如：2023、2025">
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">版本名称</label>
                                <input type="text" class="form-input" value="人教版 2025年审定版" placeholder="输入版本名称">
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">ISBN编号</label>
                                <input type="text" class="form-input" value="9787107362758" placeholder="输入ISBN编号">
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">适用学段</label>
                                <select class="form-input">
                                    <option>高中一年级</option>
                                    <option>高中二年级</option>
                                    <option>高中三年级</option>
                                </select>
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">是否为最新版本</label>
                                <div class="flex items-center space-x-4">
                                    <label class="inline-flex items-center">
                                        <input type="radio" name="isLatest" checked class="text-primary focus:ring-primary">
                                        <span class="ml-2 text-sm text-dark">是</span>
                                    </label>
                                    <label class="inline-flex items-center">
                                        <input type="radio" name="isLatest" class="text-primary focus:ring-primary">
                                        <span class="ml-2 text-sm text-dark">否</span>
                                    </label>
                                </div>
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">版本描述</label>
                                <textarea class="form-input min-h-[100px]" placeholder="描述版本特点、修订内容等">本版本根据2024年新课标修订，新增数学建模案例3个，调整函数章节例题12道，优化习题难度梯度。</textarea>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 版本对比 -->
                    <div class="bg-white rounded-2xl p-6 shadow-card">
                        <h3 class="text-lg font-bold text-dark mb-4 flex items-center">
                            <i class="fa fa-exchange text-primary mr-2"></i>版本对比
                        </h3>
                        <p class="text-sm text-muted mb-4">与其他版本对比差异</p>
                        
                        <div class="space-y-3">
                            <div class="border border-gray-200 rounded-lg p-3 hover:border-primary/30 transition-colors">
                                <div class="flex justify-between items-center mb-1">
                                    <span class="text-sm font-medium text-dark">人教版 2023版</span>
                                    <span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded-full">有差异</span>
                                </div>
                                <p class="text-xs text-muted">章节结构调整3处，新增知识点5个，删除过时例题8道</p>
                                <button class="text-primary text-xs mt-2 hover:underline">查看详细对比</button>
                            </div>
                            
                            <div class="border border-gray-200 rounded-lg p-3 hover:border-primary/30 transition-colors">
                                <div class="flex justify-between items-center mb-1">
                                    <span class="text-sm font-medium text-dark">苏教版 2024版</span>
                                    <span class="text-xs bg-green-100 text-green-800 px-2 py-0.5 rounded-full">部分一致</span>
                                </div>
                                <p class="text-xs text-muted">知识点覆盖率85%，表述方式存在差异</p>
                                <button class="text-primary text-xs mt-2 hover:underline">查看详细对比</button>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 右侧：章节与知识点关联 -->
                <div class="lg:col-span-2 space-y-6">
                    <!-- 章节结构管理 -->
                    <div class="bg-white rounded-2xl p-6 shadow-card">
                        <div class="flex items-center justify-between mb-6">
                            <h3 class="text-lg font-bold text-dark flex items-center">
                                <i class="fa fa-list-ol text-primary mr-2"></i>章节结构
                            </h3>
                            <div class="flex space-x-2">
                                <button class="btn-secondary text-sm px-3 py-1.5">
                                    <i class="fa fa-plus mr-1"></i>添加章节
                                </button>
                                <button class="btn-secondary text-sm px-3 py-1.5">
                                    <i class="fa fa-upload mr-1"></i>导入结构
                                </button>
                            </div>
                        </div>
                        
                        <!-- 章节树形结构 -->
                        <div class="space-y-4 max-h-[600px] overflow-y-auto pr-2">
                            <!-- 第一章 -->
                            <div class="chapter-item">
                                <div class="flex items-center justify-between bg-gray-50 p-3 rounded-lg">
                                    <div class="flex items-center">
                                        <button class="chapter-toggle mr-2 text-muted hover:text-primary" data-target="chapter-1">
                                            <i class="fa fa-chevron-down"></i>
                                        </button>
                                        <span class="font-medium text-dark">第一章 集合与常用逻辑用语</span>
                                        <span class="ml-2 text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">4小节</span>
                                    </div>
                                    <div class="flex space-x-1">
                                        <button class="p-1.5 text-muted hover:text-primary" title="添加小节">
                                            <i class="fa fa-plus-circle"></i>
                                        </button>
                                        <button class="p-1.5 text-muted hover:text-primary" title="编辑章节">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="p-1.5 text-muted hover:text-red-500" title="删除章节">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </div>
                                </div>
                                
                                <div id="chapter-1" class="pl-6 mt-2 space-y-3">
                                    <!-- 1.1 小节 -->
                                    <div class="section-item">
                                        <div class="flex items-center justify-between p-3 rounded-lg border border-gray-100 hover:border-primary/30 transition-colors">
                                            <div class="flex items-center">
                                                <button class="section-toggle mr-2 text-muted hover:text-primary" data-target="section-1-1">
                                                    <i class="fa fa-chevron-down"></i>
                                                </button>
                                                <span class="text-dark">1.1 集合的含义与表示</span>
                                                <span class="ml-2 text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded-full">3知识点</span>
                                            </div>
                                            <div class="flex space-x-1">
                                                <button class="p-1.5 text-muted hover:text-primary" title="添加知识点">
                                                    <i class="fa fa-plus-circle"></i>
                                                </button>
                                                <button class="p-1.5 text-muted hover:text-primary" title="编辑小节">
                                                    <i class="fa fa-edit"></i>
                                                </button>
                                                <button class="p-1.5 text-muted hover:text-red-500" title="删除小节">
                                                    <i class="fa fa-trash"></i>
                                                </button>
                                            </div>
                                        </div>
                                        
                                        <div id="section-1-1" class="tree-line mt-2 space-y-2">
                                            <!-- 知识点1 -->
                                            <div class="knowledge-item flex items-center justify-between p-2 rounded-lg hover:bg-primary/5 transition-colors">
                                                <div class="flex items-center">
                                                    <i class="fa fa-circle text-primary text-[6px] mr-2 mt-1.5"></i>
                                                    <span class="text-sm text-dark">集合的定义</span>
                                                </div>
                                                <div class="flex space-x-1">
                                                    <button class="p-1 text-muted hover:text-primary" title="编辑知识点">
                                                        <i class="fa fa-edit"></i>
                                                    </button>
                                                    <button class="p-1 text-muted hover:text-red-500" title="删除知识点">
                                                        <i class="fa fa-trash"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            
                                            <!-- 知识点2 -->
                                            <div class="knowledge-item flex items-center justify-between p-2 rounded-lg hover:bg-primary/5 transition-colors">
                                                <div class="flex items-center">
                                                    <i class="fa fa-circle text-primary text-[6px] mr-2 mt-1.5"></i>
                                                    <span class="text-sm text-dark">集合的表示方法</span>
                                                </div>
                                                <div class="flex space-x-1">
                                                    <button class="p-1 text-muted hover:text-primary" title="编辑知识点">
                                                        <i class="fa fa-edit"></i>
                                                    </button>
                                                    <button class="p-1 text-muted hover:text-red-500" title="删除知识点">
                                                        <i class="fa fa-trash"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            
                                            <!-- 知识点3 -->
                                            <div class="knowledge-item flex items-center justify-between p-2 rounded-lg hover:bg-primary/5 transition-colors">
                                                <div class="flex items-center">
                                                    <i class="fa fa-circle text-primary text-[6px] mr-2 mt-1.5"></i>
                                                    <span class="text-sm text-dark">元素与集合的关系</span>
                                                </div>
                                                <div class="flex space-x-1">
                                                    <button class="p-1 text-muted hover:text-primary" title="编辑知识点">
                                                        <i class="fa fa-edit"></i>
                                                    </button>
                                                    <button class="p-1 text-muted hover:text-red-500" title="删除知识点">
                                                        <i class="fa fa-trash"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    
                                    <!-- 1.2 小节 -->
                                    <div class="section-item">
                                        <div class="flex items-center justify-between p-3 rounded-lg border border-gray-100 hover:border-primary/30 transition-colors">
                                            <div class="flex items-center">
                                                <button class="section-toggle mr-2 text-muted hover:text-primary" data-target="section-1-2">
                                                    <i class="fa fa-chevron-right"></i>
                                                </button>
                                                <span class="text-dark">1.2 集合间的基本关系</span>
                                                <span class="ml-2 text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded-full">2知识点</span>
                                            </div>
                                            <div class="flex space-x-1">
                                                <button class="p-1.5 text-muted hover:text-primary" title="添加知识点">
                                                    <i class="fa fa-plus-circle"></i>
                                                </button>
                                                <button class="p-1.5 text-muted hover:text-primary" title="编辑小节">
                                                    <i class="fa fa-edit"></i>
                                                </button>
                                                <button class="p-1.5 text-muted hover:text-red-500" title="删除小节">
                                                    <i class="fa fa-trash"></i>
                                                </button>
                                            </div>
                                        </div>
                                        
                                        <div id="section-1-2" class="tree-line mt-2 space-y-2 hidden">
                                            <!-- 知识点（折叠状态） -->
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <!-- 第二章 -->
                            <div class="chapter-item">
                                <div class="flex items-center justify-between bg-gray-50 p-3 rounded-lg">
                                    <div class="flex items-center">
                                        <button class="chapter-toggle mr-2 text-muted hover:text-primary" data-target="chapter-2">
                                            <i class="fa fa-chevron-right"></i>
                                        </button>
                                        <span class="font-medium text-dark">第二章 一元二次函数、方程和不等式</span>
                                        <span class="ml-2 text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">3小节</span>
                                    </div>
                                    <div class="flex space-x-1">
                                        <button class="p-1.5 text-muted hover:text-primary" title="添加小节">
                                            <i class="fa fa-plus-circle"></i>
                                        </button>
                                        <button class="p-1.5 text-muted hover:text-primary" title="编辑章节">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="p-1.5 text-muted hover:text-red-500" title="删除章节">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </div>
                                </div>
                                
                                <div id="chapter-2" class="pl-6 mt-2 space-y-3 hidden">
                                    <!-- 第二章内容（折叠状态） -->
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 关联资源 -->
                    <div class="bg-white rounded-2xl p-6 shadow-card">
                        <div class="flex items-center justify-between mb-6">
                            <h3 class="text-lg font-bold text-dark flex items-center">
                                <i class="fa fa-link text-primary mr-2"></i>关联资源
                            </h3>
                            <button class="btn-secondary text-sm px-3 py-1.5">
                                <i class="fa fa-plus mr-1"></i>添加资源
                            </button>
                        </div>
                        
                        <div class="overflow-x-auto">
                            <table class="min-w-full divide-y divide-gray-200">
                                <thead class="bg-gray-50">
                                    <tr>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">资源名称</th>
                                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">类型</th>
                                        <th scope="col" class="px-6 py-






                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">上传时间</th>
                                    <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white divide-y divide-gray-200">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="flex items-center">
                                            <div class="w-8 h-8 bg-blue-100 rounded flex items-center justify-center text-blue-600 mr-3">
                                                <i class="fa fa-file-pdf-o"></i>
                                            </div>
                                            <div>
                                                <div class="text-sm font-medium text-dark">集合知识点详解.pdf</div>
                                                <div class="text-xs text-muted">2.4MB</div>
                                            </div>
                                        </div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">文档</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">
                                        第一章 1.1小节
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">
                                        2025-03-10
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-download"></i>
                                        </button>
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="flex items-center">
                                            <div class="w-8 h-8 bg-green-100 rounded flex items-center justify-center text-green-600 mr-3">
                                                <i class="fa fa-play-circle"></i>
                                            </div>
                                            <div>
                                                <div class="text-sm font-medium text-dark">集合的概念与运算.mp4</div>
                                                <div class="text-xs text-muted">15.6MB</div>
                                            </div>
                                        </div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">视频</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">
                                        第一章 全章节
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">
                                        2025-03-05
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-download"></i>
                                        </button>
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="flex items-center">
                                            <div class="w-8 h-8 bg-purple-100 rounded flex items-center justify-center text-purple-600 mr-3">
                                                <i class="fa fa-file-powerpoint-o"></i>
                                            </div>
                                            <div>
                                                <div class="text-sm font-medium text-dark">集合与函数教学课件.pptx</div>
                                                <div class="text-xs text-muted">8.2MB</div>
                                            </div>
                                        </div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-purple-100 text-purple-800">课件</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-dark">
                                        第一章、第二章
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-muted">
                                        2025-02-28
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-download"></i>
                                        </button>
                                        <button class="text-primary hover:text-primary/80 mr-3">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                    <!-- 分页 -->

                    <div class="flex items-center justify-between mt-6">
                        <div class="text-sm text-muted">
                            显示 <span class="font-medium">1</span> 到 <span class="font-medium">3</span> 条，共 <span class="font-medium">12</span> 条
                        </div>
                        <div class="flex space-x-1">
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed" disabled>
                                <i class="fa fa-angle-left"></i>
                            </button>
                            <button class="px-3 py-1 rounded-lg bg-primary text-white">1</button>
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50">2</button>
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50">3</button>
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50">4</button>
                            <button class="px-3 py-1 rounded-lg border border-gray-300 text-muted hover:bg-gray-50">
                                <i class="fa fa-angle-right"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>

<!-- JavaScript -->

<script>
    // 章节/小节折叠展开逻辑
    document.addEventListener('DOMContentLoaded', function() {
        // 章节折叠切换
        document.querySelectorAll('.chapter-toggle').forEach(toggle => {
            toggle.addEventListener('click', function() {
                const targetId = this.getAttribute('data-target');
                const targetElement = document.getElementById(targetId);
                const icon = this.querySelector('i');
                
                targetElement.classList.toggle('hidden');
                if (targetElement.classList.contains('hidden')) {
                    icon.classList.remove('fa-chevron-down');
                    icon.classList.add('fa-chevron-right');
                } else {
                    icon.classList.remove('fa-chevron-right');
                    icon.classList.add('fa-chevron-down');
                }
            });
        });
        
        // 小节折叠切换
        document.querySelectorAll('.section-toggle').forEach(toggle => {
            toggle.addEventListener('click', function() {
                const targetId = this.getAttribute('data-target');
                const targetElement = document.getElementById(targetId);
                const icon = this.querySelector('i');
                
                targetElement.classList.toggle('hidden');
                if (targetElement.classList.contains('hidden')) {
                    icon.classList.remove('fa-chevron-down');
                    icon.classList.add('fa-chevron-right');
                } else {
                    icon.classList.remove('fa-chevron-right');
                    icon.classList.add('fa-chevron-down');
                }
            });
        });
        
        // 移动端菜单切换
        const mobileMenuButton = document.getElementById('mobile-menu-button');
        const sidebar = document.getElementById('sidebar');
        
        if (mobileMenuButton && sidebar) {
            mobileMenuButton.addEventListener('click', function() {
                sidebar.classList.toggle('-translate-x-full');
            });
        }
        
        // 初始化移动端侧边栏状态
        function checkScreenSize() {
            if (window.innerWidth < 768) {
                sidebar.classList.add('-translate-x-full');
            } else {
                sidebar.classList.remove('-translate-x-full');
            }
        }
        
        // 初始检查
        checkScreenSize();
        
        // 窗口大小变化时检查
        window.addEventListener('resize', checkScreenSize);
    });
</script>
</body>
</html>